package com.chatdating.mapper;

import com.chatdating.entity.UserTag;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserTagMapper {
    @Select("select * from user_tag_form where user_id = #{id}")
    List<UserTag> getUserTagById(@Param("id") int id);

    @Insert("insert into user_tag_form(user_id,tag_id) values (#{userId},#{tagId})")
    void insertUserTag(@Param("userId") int userId,@Param("tagId") int tagId);

    @Delete("DELETE FROM user_tag_form WHERE user_id = #{userId} AND tag_id = #{tagId}")
    void deleteUserTag(@Param("userId") int userId,@Param("tagId") int tagId);
}
